gtk4.git
8 years agotoolpalette: Remove
Benjamin Otte [Sat, 3 Feb 2018 10:52:37 +0000 (11:52 +0100)]
toolpalette: Remove

The widget was basically unmaintained since GTK 3.0 and the only known
user was Glade.

8 years agogtk: Remove GtkRecentChooser
Benjamin Otte [Fri, 2 Feb 2018 17:01:17 +0000 (18:01 +0100)]
gtk: Remove GtkRecentChooser

It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.

8 years agotests: Unrealize renderer
Benjamin Otte [Fri, 2 Feb 2018 14:34:34 +0000 (15:34 +0100)]
tests: Unrealize renderer

Renderers must be unrealized these days.

8 years agotexture: Add sanity checks to constructors
Benjamin Otte [Fri, 2 Feb 2018 13:58:39 +0000 (14:58 +0100)]
texture: Add sanity checks to constructors

width, height and GL texture ID may not be 0, so return_if_fail() if
they are.

8 years agotexture: Make the texture id a guint
Benjamin Otte [Fri, 2 Feb 2018 13:58:12 +0000 (14:58 +0100)]
texture: Make the texture id a guint

Texture IDs are unsigned, so treat them like that.

8 years agoRename GtkActionMuxer's private header
Emmanuele Bassi [Fri, 2 Feb 2018 09:13:10 +0000 (10:13 +0100)]
Rename GtkActionMuxer's private header

Follow the naming policy for private headers.

8 years agoRename GtkActionHelper private header
Emmanuele Bassi [Fri, 2 Feb 2018 09:08:41 +0000 (10:08 +0100)]
Rename GtkActionHelper private header

Follow the naming scheme for private headers.

8 years agoSplit list of sources
Emmanuele Bassi [Fri, 2 Feb 2018 09:01:47 +0000 (10:01 +0100)]
Split list of sources

We need to have two lists: one, with the list of sources that need to be
introspected; and one with the list of sources that contain only private
symbols.

This reduces the amount of source files that the introspection scanner
needs to traverse, and thus the build time.

8 years agodocs: Annotate gdk_keymap_get_display()
Emmanuele Bassi [Thu, 1 Feb 2018 15:13:53 +0000 (16:13 +0100)]
docs: Annotate gdk_keymap_get_display()

Avoid a warning from the introspection scanner.

8 years agoRemove unnecessary gtk-doc stanza
Emmanuele Bassi [Thu, 1 Feb 2018 15:08:51 +0000 (16:08 +0100)]
Remove unnecessary gtk-doc stanza

The places sidebar is not a publicly documented API, so there's no need
to use a gtk-doc stanza — especially if the syntax of the stanza is
wrong.

8 years agoRemove leading underscore from private symbols
Emmanuele Bassi [Thu, 1 Feb 2018 15:05:58 +0000 (16:05 +0100)]
Remove leading underscore from private symbols

There's no need to do that any more, as only explicitly annotated
symbols are exported.

8 years agoRename gtkiconcachevalidator.h
Emmanuele Bassi [Thu, 1 Feb 2018 15:01:38 +0000 (16:01 +0100)]
Rename gtkiconcachevalidator.h

Follow the same convention for private headers as newer parts of GTK.

8 years agoRename gtkiconcache.h
Emmanuele Bassi [Thu, 1 Feb 2018 14:34:57 +0000 (15:34 +0100)]
Rename gtkiconcache.h

The gtkiconcache.h header is private, so rename it to follow the naming
scheme for private headers.

8 years agoReplace boilerplate in GtkIcon
Emmanuele Bassi [Thu, 1 Feb 2018 14:29:01 +0000 (15:29 +0100)]
Replace boilerplate in GtkIcon

Be a good GObject citizen and use G_DECLARE_FINAL_TYPE instead of
writing the usual GObject boilerplate.

8 years agoiconview: Fix a problem with the previous change
Matthias Clasen [Wed, 31 Jan 2018 16:44:26 +0000 (17:44 +0100)]
iconview: Fix a problem with the previous change

After commit ffef28a7e8d5ffef7de6a3baccb30b0021b6b0ff,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.

8 years agodnd: Remove unused member variable
Benjamin Otte [Sun, 17 Dec 2017 19:40:03 +0000 (20:40 +0100)]
dnd: Remove unused member variable

8 years agodnd: Move GdkDragProtocol to X11
Benjamin Otte [Sun, 17 Dec 2017 19:36:40 +0000 (20:36 +0100)]
dnd: Move GdkDragProtocol to X11

It's not needed in the generic implementation, so don't have it there.

8 years agodnd: Remove 2 vfuncs that aren't needed
Benjamin Otte [Sun, 17 Dec 2017 19:29:11 +0000 (20:29 +0100)]
dnd: Remove 2 vfuncs that aren't needed

They're only used inside the X11 backend, and the backend can just call
its own function.

8 years agoicon browser: Remove usage of stock-size property
Timm Bäder [Tue, 30 Jan 2018 20:38:23 +0000 (21:38 +0100)]
icon browser: Remove usage of stock-size property

Does not exist anymore.

8 years agoRevert "menu: Simplify popup_at_rect"
Timm Bäder [Tue, 30 Jan 2018 09:18:54 +0000 (10:18 +0100)]
Revert "menu: Simplify popup_at_rect"

This reverts commit a29306cb1e739afaa4a7b31d48c4bec328cfef9e.

8 years agorange: Always queue an allocate if the adjustment changed
Timm Bäder [Tue, 30 Jan 2018 09:13:51 +0000 (10:13 +0100)]
range: Always queue an allocate if the adjustment changed

The slider gets its new size in size-allocate, so we have to do this
even if the range has no origin.

8 years agowayland: Add support for BTN_STYLUS3
Jason Gerecke [Tue, 10 Oct 2017 16:17:43 +0000 (09:17 -0700)]
wayland: Add support for BTN_STYLUS3

BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033

8 years agoAdd AGPL3-only licence to GtkAboutDialog
Nuclear Sunshine [Tue, 23 Jan 2018 13:49:31 +0000 (13:49 +0000)]
Add AGPL3-only licence to GtkAboutDialog

https://bugzilla.gnome.org/show_bug.cgi?id=792793

8 years agogl: Add test case for clipped cross fade nodes
Timm Bäder [Sat, 27 Jan 2018 11:19:22 +0000 (12:19 +0100)]
gl: Add test case for clipped cross fade nodes

8 years agogl renderer: Reset clip when drawing offscreen
Timm Bäder [Sat, 27 Jan 2018 11:13:37 +0000 (12:13 +0100)]
gl renderer: Reset clip when drawing offscreen

Just like we reset the scissor test and the viewport, we also can't use
the current clip anymore in this case.

8 years agoGskRoundedRect: Fix GSK_ROUNDED_RECT_INIT macro
Timm Bäder [Sat, 27 Jan 2018 11:11:49 +0000 (12:11 +0100)]
GskRoundedRect: Fix GSK_ROUNDED_RECT_INIT macro

GskRoundedRect does not have a .rect member, it's 'bounds'. Also,
properly initialize all fields, i.e. all the corners.

8 years agogl renderer: Fix hidpi cairo node rendering
Timm Bäder [Sat, 27 Jan 2018 10:02:07 +0000 (11:02 +0100)]
gl renderer: Fix hidpi cairo node rendering

We can't just unconditionally create a larger texture here, since the
incoming cairo surface might have a device scale that doesn't fit our
scale_factor. Instead, look up the surface device scale and use that.

8 years agogl renderer: Make width/height relation more obvious
Timm Bäder [Sat, 27 Jan 2018 10:00:59 +0000 (11:00 +0100)]
gl renderer: Make width/height relation more obvious

In add_offscreen_ops, we use the max_x/min_x values for the texture and
viewport width, and the max_y/min_y for the texture and viewport height.

8 years agoinspector: Actually call the pick() vfunc when picking
Timm Bäder [Fri, 26 Jan 2018 16:28:25 +0000 (17:28 +0100)]
inspector: Actually call the pick() vfunc when picking

Otherwise, overridden pick vfuncs don't work and we e.g. pick widgets
scrolled away in a viewport.

8 years agoentry: Remove unused struct members
Timm Bäder [Fri, 26 Jan 2018 14:51:33 +0000 (15:51 +0100)]
entry: Remove unused struct members

8 years agomenu: Simplify popup_at_rect
Timm Bäder [Wed, 24 Jan 2018 07:44:53 +0000 (08:44 +0100)]
menu: Simplify popup_at_rect

No need to keep a separate current_event variable around, we don't use
it anyway.

8 years agogdk: Stop referring to ::key-press/release-event
Matthias Clasen [Tue, 23 Jan 2018 23:04:28 +0000 (00:04 +0100)]
gdk: Stop referring to ::key-press/release-event

These signals are going away, don't mention them in
the docs.

8 years agoentry completion: Stop using key-press/release-event
Matthias Clasen [Tue, 23 Jan 2018 23:02:58 +0000 (00:02 +0100)]
entry completion: Stop using key-press/release-event

We can use the existing ::event handler for this.

8 years agogsk: Add test case for last commit
Timm Bäder [Tue, 23 Jan 2018 20:46:05 +0000 (21:46 +0100)]
gsk: Add test case for last commit

8 years agogl renderer: Fix outset shadow outline transform
Timm Bäder [Tue, 23 Jan 2018 20:44:33 +0000 (21:44 +0100)]
gl renderer: Fix outset shadow outline transform

This fixes hidpi blurred outset shadows

8 years agoEnforce UTF-8 encoding when opening C files
Emmanuele Bassi [Thu, 18 Jan 2018 19:23:16 +0000 (19:23 +0000)]
Enforce UTF-8 encoding when opening C files

We have a couple of Python 3.x scripts that parse C files, and since C
does not have any encoding, we need to force one ourselves, to avoid the
case when we're running the build in a non-UTF-8 locale.

https://bugzilla.gnome.org/show_bug.cgi?id=792497

8 years agoWidget: Don’t call reset() on NULL EventController
Daniel Boles [Thu, 18 Jan 2018 00:51:24 +0000 (00:51 +0000)]
Widget: Don’t call reset() on NULL EventController

GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624

8 years agoUpdate Esperanto translation
GNOME Translation Robot [Mon, 22 Jan 2018 18:34:48 +0000 (18:34 +0000)]
Update Esperanto translation

(cherry picked from commit 814c55d473c6a7ab9f930421aad5612a351ba68d)

8 years agoGtkGestureMultiPress: check event state before emiting released signal
Juan Pablo Ugarte [Mon, 22 Jan 2018 14:20:14 +0000 (11:20 -0300)]
GtkGestureMultiPress: check event state before emiting released signal

Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"

8 years agowidget: Only initialize bounds rect if necessary
Timm Bäder [Sun, 21 Jan 2018 19:37:46 +0000 (20:37 +0100)]
widget: Only initialize bounds rect if necessary

We only use the graphene_rect_t version of the offset_clip for the
fallback cairo nodes.

8 years agovulkan: Fix release builds
Timm Bäder [Sun, 21 Jan 2018 14:23:17 +0000 (15:23 +0100)]
vulkan: Fix release builds

8 years agocombobox: Remove some unneeded includes
Timm Bäder [Sun, 21 Jan 2018 10:01:32 +0000 (11:01 +0100)]
combobox: Remove some unneeded includes

8 years agoSet GDK_WINDOW_STATE_TILED if any edge is tiled
Simon McVittie [Thu, 26 Oct 2017 14:51:51 +0000 (15:51 +0100)]
Set GDK_WINDOW_STATE_TILED if any edge is tiled

This state flag is used in several places in GTK+, for example to
ignore RESIZE_INC hints if tiled. Setting it is also necessary for
backwards compatibility with applications that changed their behaviour
when tiled, such as GNOME Terminal and its MATE fork.

Signed-off-by: Simon McVittie <smcv@debian.org>
https://bugzilla.gnome.org/show_bug.cgi?id=789357

8 years agodisplay-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
Georges Basile Stavracas Neto [Wed, 4 Oct 2017 18:33:15 +0000 (15:33 -0300)]
display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported

Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516

8 years agoentrycompletion: Realize toplevel before attempting a grab
Timm Bäder [Fri, 19 Jan 2018 14:15:09 +0000 (15:15 +0100)]
entrycompletion: Realize toplevel before attempting a grab

Otherwise, gtk_widget_get_window returns NULL and we can't successfully
perform a grab via the later gdk_set_grab call. This fixes the entry
completion in the file chooser not working.

8 years agotests: Remove some unneeded gtk_widget_show calls
Matthias Clasen [Fri, 19 Jan 2018 15:22:28 +0000 (16:22 +0100)]
tests: Remove some unneeded gtk_widget_show calls

Widgets are visible by default now.

8 years agoiconview: Fix updates with filter models
Matthias Clasen [Fri, 19 Jan 2018 15:04:18 +0000 (16:04 +0100)]
iconview: Fix updates with filter models

Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.

8 years agoAdd a test for ::row-changed vs node refs
Matthias Clasen [Fri, 19 Jan 2018 15:02:42 +0000 (16:02 +0100)]
Add a test for ::row-changed vs node refs

Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.

8 years agogtkwindow: Disconnect GdkSeat::device-removed callback on finalize
Carlos Garnacho [Fri, 19 Jan 2018 17:47:21 +0000 (18:47 +0100)]
gtkwindow: Disconnect GdkSeat::device-removed callback on finalize

Otherwise dangling callbacks may lead to crashes.

8 years agogl renderer: Fix shadow node child offset
Timm Bäder [Fri, 19 Jan 2018 14:00:22 +0000 (15:00 +0100)]
gl renderer: Fix shadow node child offset

We shouldn't apply the shadow offset when drawing the child offscreen,
instead apply it afterwards when we draw it to the current render
target.

8 years agotestsuite: Add another gl renderer test case
Timm Bäder [Fri, 19 Jan 2018 13:59:31 +0000 (14:59 +0100)]
testsuite: Add another gl renderer test case

8 years agolinkbutton: Only set widget cursor once
Timm Bäder [Fri, 19 Jan 2018 12:21:41 +0000 (13:21 +0100)]
linkbutton: Only set widget cursor once

8 years agoinspector: Allow picking insensitive widgets
Timm Bäder [Fri, 19 Jan 2018 09:16:15 +0000 (10:16 +0100)]
inspector: Allow picking insensitive widgets

The default gtk_widget_contains/gtk_widget_pick don't consider
insensitive widgets.

8 years agocsswidgetnode: Avoid some unnecessary work
Timm Bäder [Fri, 19 Jan 2018 08:57:49 +0000 (09:57 +0100)]
csswidgetnode: Avoid some unnecessary work

The later code would just ref both styles and not do anything else.

8 years agowidget-factory: Fix some layout issues
Timm Bäder [Fri, 19 Jan 2018 08:53:39 +0000 (09:53 +0100)]
widget-factory: Fix some layout issues

We have to explicitly set some of these to their default values so
expand-set is TRUE and the boxes stop propagating their expansion state
up the hierarchy.

8 years agotextview: Remove some stray debugging output
Timm Bäder [Thu, 18 Jan 2018 20:54:03 +0000 (21:54 +0100)]
textview: Remove some stray debugging output

Leftover from 7046463b880c79b227594a2b35a6c625119d286e

8 years agoSimplify all ui files again
Matthias Clasen [Thu, 18 Jan 2018 22:46:58 +0000 (17:46 -0500)]
Simplify all ui files again

Now even simpler!

8 years agobuilder-tool: Try harder to find types
Matthias Clasen [Thu, 18 Jan 2018 22:45:12 +0000 (17:45 -0500)]
builder-tool: Try harder to find types

If g_type_from_name fails, try gtk_builder_get_type_from_name
before giving up. This fixes cases like GtkPrinterOptionWidget.

8 years agowindow: Ignore gtk_window_close calls from close-request handlers
Timm Bäder [Thu, 18 Jan 2018 14:10:49 +0000 (15:10 +0100)]
window: Ignore gtk_window_close calls from close-request handlers

8 years agowidget: Always assign values to out parameter in translate_coordinates
Timm Bäder [Thu, 18 Jan 2018 13:43:36 +0000 (14:43 +0100)]
widget: Always assign values to out parameter in translate_coordinates

safe guard against people using the returned coordinate values without
checking the return value of gtk_widget_translate_coordinates.

8 years agowidget: Initialize a local variable
Timm Bäder [Thu, 18 Jan 2018 13:42:39 +0000 (14:42 +0100)]
widget: Initialize a local variable

We will later pass this variable on to some other functions, so be safe
against them using the value.

8 years agoaboutdialog: Only close on delete events
Timm Bäder [Thu, 18 Jan 2018 13:38:27 +0000 (14:38 +0100)]
aboutdialog: Only close on delete events

Clicking on the Credits button should not close the dialog.

8 years agofontchooswerwidget: Center spinbutton next to scales vertically
Timm Bäder [Thu, 18 Jan 2018 08:40:19 +0000 (09:40 +0100)]
fontchooswerwidget: Center spinbutton next to scales vertically

8 years agogl renderer: Render GL textures upside down
Timm Bäder [Thu, 18 Jan 2018 07:21:11 +0000 (08:21 +0100)]
gl renderer: Render GL textures upside down

These come from an FBO so we need to flip the texture coords on the y
axis, just like we do everywhere else.

8 years agoRevert "inspector: Stop adding event controllers to the object tree"
Matthias Clasen [Thu, 18 Jan 2018 04:49:17 +0000 (23:49 -0500)]
Revert "inspector: Stop adding event controllers to the object tree"

This reverts commit 8f3cb2658a79d20912b6f2ec96bc7e6bbdaeb067.

This didn't quite work out, since being in the object tree is
a prerequisite for showing up in the property editor.

8 years agoDocument new texture api
Matthias Clasen [Thu, 18 Jan 2018 02:45:08 +0000 (21:45 -0500)]
Document new texture api

8 years agoUse the new api to release resources
Matthias Clasen [Thu, 18 Jan 2018 01:19:19 +0000 (20:19 -0500)]
Use the new api to release resources

When we unrealize a GL area with outstanding textures,
call gdk_texture_release_gl on them to avoid later crashes.

8 years agoAdd a way to release GL resources
Matthias Clasen [Thu, 18 Jan 2018 01:15:45 +0000 (20:15 -0500)]
Add a way to release GL resources

The inspector may hold on to render nodes and textures
beyond the lifetime of the widget (and thus the GL
resources). To handle this situation, allow the widget
to explicitly release the GL resources, and make
the texture available on the clent-side as a cairo
surface. This lets the recorder still show the content
after the widget is gone.

8 years agoglarea: Drop the dispose vfunc
Matthias Clasen [Thu, 18 Jan 2018 00:49:52 +0000 (19:49 -0500)]
glarea: Drop the dispose vfunc

This was causing us to leak, in the following scenario:
1) gtk_widget_destroy is called on a GL area
2) dispose is run and clears the context
3) the GL area is unrealized, but the context is already cleared,
   so we leak all the GL buffers

8 years agoglarea: Always delete textures on unrealize
Matthias Clasen [Thu, 18 Jan 2018 00:49:05 +0000 (19:49 -0500)]
glarea: Always delete textures on unrealize

We need to make the context current for deleting
textures as well, so just do it unconditionally.

8 years agoglarea: Avoid a crash
Matthias Clasen [Thu, 18 Jan 2018 00:48:33 +0000 (19:48 -0500)]
glarea: Avoid a crash

We must only delete the texture if it is not NULL.

8 years agogdkgears: add a way to remove gears
Matthias Clasen [Thu, 18 Jan 2018 00:47:45 +0000 (19:47 -0500)]
gdkgears: add a way to remove gears

This is needed to test the GL resource cleanup
code paths.

8 years agoglarea: Add a pool for GL textures
Matthias Clasen [Thu, 18 Jan 2018 00:15:14 +0000 (19:15 -0500)]
glarea: Add a pool for GL textures

Handle the situation that a GL texture might remain
in use (e.g. by a slow frame, or by the recorder)
In that case, we can't modify it but must use a
new one. Keep a pool of GL textures for this eventuality.

8 years agoinspector: Don't leak recordings
Matthias Clasen [Thu, 18 Jan 2018 00:12:27 +0000 (19:12 -0500)]
inspector: Don't leak recordings

g_list_model_get_item is transfer full, so we need
to drop the references we get from it. This was showing
up while testing the GL texture cache in GtkGLArea.

8 years agorendernodeimpl: Fix a crash
Timm Bäder [Wed, 17 Jan 2018 20:47:05 +0000 (21:47 +0100)]
rendernodeimpl: Fix a crash

We may get a NULL renderer here.

8 years agoapplicationwindow: Fix measure implementation
Timm Bäder [Wed, 17 Jan 2018 15:02:28 +0000 (16:02 +0100)]
applicationwindow: Fix measure implementation

Really calculate the menubar height, not the width.

8 years agosizerequest: Fix for_size adjustment
Timm Bäder [Wed, 17 Jan 2018 14:42:01 +0000 (15:42 +0100)]
sizerequest: Fix for_size adjustment

We need to pull the proper size from the size request cache and adjust
it accordingly.

8 years agobox: Simplify some code
Timm Bäder [Wed, 17 Jan 2018 12:11:32 +0000 (13:11 +0100)]
box: Simplify some code

All out varibles in measure implementations must be non-null and -1 is
the default value for the baseline parameters.

8 years agobox: Remove self assignment
Timm Bäder [Wed, 17 Jan 2018 12:02:58 +0000 (13:02 +0100)]
box: Remove self assignment

8 years agobox: Remove useless if statement
Timm Bäder [Wed, 17 Jan 2018 11:54:42 +0000 (12:54 +0100)]
box: Remove useless if statement

We already check right before this one whether child->pack != packing
and if so, we continue to the next iteration. So, no need to check again
whether the inverted condition child->pack == packing is true, because
it is.

8 years agolabel: Update layout width directly form allocation
Timm Bäder [Wed, 17 Jan 2018 11:36:37 +0000 (12:36 +0100)]
label: Update layout width directly form allocation

For the one update_layout_width call in size_allocate, we can just use
the passed-in allocation width instead of a separate (relatively slow)
gtk_widget_get_width call.

8 years agowidget: Clip redrawn area to widget clip
Timm Bäder [Tue, 16 Jan 2018 19:25:02 +0000 (20:25 +0100)]
widget: Clip redrawn area to widget clip

The clip can already be modified in size_allocate, so we never want a
widget to invalidate more than its actual clip region.

8 years agobox: Remove some unneeded checks
Timm Bäder [Tue, 16 Jan 2018 17:47:52 +0000 (18:47 +0100)]
box: Remove some unneeded checks

We only call this function from the measure implementation and we should
never get NULL pointers there.

8 years agobox: Remove an unnecessary local variable
Timm Bäder [Tue, 16 Jan 2018 16:50:11 +0000 (17:50 +0100)]
box: Remove an unnecessary local variable

8 years agobox: Use GtkWidget's widget list in get_size
Timm Bäder [Tue, 16 Jan 2018 16:44:46 +0000 (17:44 +0100)]
box: Use GtkWidget's widget list in get_size

8 years agolistbox: Don't assume that row child == focus widget
Timm Bäder [Tue, 16 Jan 2018 14:12:24 +0000 (15:12 +0100)]
listbox: Don't assume that row child == focus widget

With widgets supporting child widgets and custom GtkListBoxRow
subclasses, this might not be true.

8 years agowidget: Remove reparent special case
Timm Bäder [Tue, 16 Jan 2018 13:50:50 +0000 (14:50 +0100)]
widget: Remove reparent special case

Since gtk_widget_reparent doesn't exist anymore, we can also remove this
special case.

8 years agocontainer: Remove some unused includes
Timm Bäder [Mon, 15 Jan 2018 21:07:29 +0000 (22:07 +0100)]
container: Remove some unused includes

8 years agoviewport: Remove some unused includes
Timm Bäder [Mon, 15 Jan 2018 20:58:36 +0000 (21:58 +0100)]
viewport: Remove some unused includes

8 years agogl area: Avoid trivialities
Matthias Clasen [Wed, 17 Jan 2018 19:43:50 +0000 (14:43 -0500)]
gl area: Avoid trivialities

If we have zero pixels, no need to snapshot anything,
and produce GL errors while doing so.

8 years agogtk-demo: Add gears to the bowl
Matthias Clasen [Wed, 17 Jan 2018 19:39:46 +0000 (14:39 -0500)]
gtk-demo: Add gears to the bowl

Just for fun.

8 years agoDrop GtkGLArea::has-alpha
Matthias Clasen [Wed, 17 Jan 2018 14:22:01 +0000 (09:22 -0500)]
Drop GtkGLArea::has-alpha

We now always behave as if has-alpha is TRUE.

Update all callers.

8 years agoConvert gtkglarea to use snapshots
Matthias Clasen [Wed, 17 Jan 2018 12:25:51 +0000 (07:25 -0500)]
Convert gtkglarea to use snapshots

Just append a texture node.

Note that this is not 100% done yet. The GL area really
needs to keep a pool of textures, and only reuse them
once the GdkTexture object is gone.

8 years agogsk: Handle GL textures
Matthias Clasen [Wed, 17 Jan 2018 05:52:15 +0000 (00:52 -0500)]
gsk: Handle GL textures

These textures already have a GL texture in them,
no need to create a new one.

8 years agogdk: Add a gl texture implementation
Matthias Clasen [Wed, 17 Jan 2018 05:32:26 +0000 (00:32 -0500)]
gdk: Add a gl texture implementation

This will be used to pass a GL textures from the application
(or rather, GtkGLArea) down to the GSK GL renderer.

8 years agoDrop removed api from the docs
Matthias Clasen [Wed, 17 Jan 2018 04:33:40 +0000 (23:33 -0500)]
Drop removed api from the docs

This should have been part of the previous commit.

8 years agogdk: Drop some unused cursor apis
Matthias Clasen [Wed, 17 Jan 2018 04:22:41 +0000 (23:22 -0500)]
gdk: Drop some unused cursor apis

The query function for cursor sizes and capabilities
are not very interesting. At least, they are not used
in GTK+, and all backends but X11 just hardcode
made-up values anyway. So, lets drop them.

8 years agoinspector: Stop using gdk_display_get_default_cursor_size
Matthias Clasen [Wed, 17 Jan 2018 04:21:32 +0000 (23:21 -0500)]
inspector: Stop using gdk_display_get_default_cursor_size

If the cursor theme size setting has no value, just hardcode 32.
Also, allow ridiculously large cursors, just for fun.

8 years agotooltip: Stop using gdk_display_get_default_cursor_size
Matthias Clasen [Wed, 17 Jan 2018 04:20:12 +0000 (23:20 -0500)]
tooltip: Stop using gdk_display_get_default_cursor_size

It makes more sense to use the actual cursor theme size here.

8 years agotestgtk: Stop using gdk_display_get_maximal_cursor_size
Matthias Clasen [Wed, 17 Jan 2018 04:25:12 +0000 (23:25 -0500)]
testgtk: Stop using gdk_display_get_maximal_cursor_size

This function is going away. Just make a reasonable assumption
that cursor sizes up to 128 are supported.